home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
util
/
boot
/
BlizKick.lha
/
BlizKick
/
SaveROM.ASM
< prev
Wrap
Assembly Source File
|
1998-05-13
|
756b
|
46 lines
; FILE: Source:SaveROM.ASM REV: 3 --- Kickstart ROM saver.
; History
; 3 Now requires only KS 1.0.
;
include "Devpac:Gen.gs"
Main move.l (4).w,a6
clr.l -1(a0,d0.l)
move.l a0,a5
moveq #RETURN_FAIL,d7
lea (DosName,pc),a1
call OldOpenLibrary
tst.l d0
beq.b .exit
move.l d0,a6
moveq #RETURN_ERROR,d7
move.l a5,d1
move.l #MODE_NEWFILE,d2
call Open
move.l d0,d6
beq.b .closedos
lea $01000000,a0
move.l (-$14,a0),d3
sub.l d3,a0
move.l a0,d2
move.l d6,d1
call Write
cmp.l d0,d3
bne.b .closefile
moveq #RETURN_OK,d7
.closefile move.l d6,d1
call Close
tst.l d7
beq.b .closedos
move.l a5,d1
call DeleteFile
.closedos move.l a6,a1
move.l (4).w,a6
call CloseLibrary
.exit move.l d7,d0
rts
DosName dc.b 'dos.library',0